package com.example.address.api;

import com.example.address.service.AddressBookService;
import com.example.address_model.entity.AddressBook;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * @author: sjz
 * @since: 2024/7/11 22:46
 */
@Slf4j
@RestController
@RequestMapping("/addressBookApi")
public class AddressBookApi {
    @Resource
    private AddressBookService addressBookService;

    @GetMapping("/id")
    public AddressBook getById(@RequestParam("id") String id) {
        AddressBook addressBook = addressBookService.getById(id);
        return addressBook;
    }
}
